<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>返回子元素节点</title>
</head>
<body>
    <div>
        <span></span>
        asasd
        <!-- aaa -->
        <p><strong><i></i></strong></p>
    </div>
</body>
<script>
    Element.prototype.myChildren = function() {
        var child = this.childNodes,
            len = child.length,
            arr = [];
        for (var i = 0; i < len; i++) {
            if (child[i].nodeType == 1) {
                arr.push(child[i]);
            }
        }
        return arr;
    };
    var div = document.getElementsByTagName('div')[0];
</script>
</html>
